#include <iostream>
using namespace std;

int count(int n){
	int flag = 0;
	while(n!=1){
		if(n%2==0){
			n = n/2;
		}else{
			n = (3*n+1)/2;
		}
		flag++;
	}
	return flag;
}

int main(){
	int n;
	cin >> n;
	cout << count(n);
	return 0;
}
